function click_on_draft(e){
    if(!e) e=window.event;
    var btn=e.button;
    var whichone=(btn<2)?"left":"right";
    if(whichone==="left"){
       if(is_selected_reference===false){
           can_selected_reference=true;
           //如果没有进行点击主坐标系的操作的时候，就只会提示选中一个面
           display_message_of_draft();
           //只有点击草图图标之后才可以进行草图的选择
       }
    }
}

var is_selected_reference=false;
var can_selected_reference=false;
//记录坐标系中哪个面被选中
var selected_xoy=false;
var selected_xoz=false;
var selected_yoz=false;


function display_message_of_draft() {
    toastMsg('请选择草图!');
    //显示提示语
}

function display_box_of_draft() {
    document.getElementById('draft_selection').style.top="88%";
    document.getElementById('draft_selection').style.left="45%";
    document.getElementById('draft_selection').style.visibility="visible";
    //显示草图的选项框
}

obj_1=document.getElementById("draft");
obj_1.onclick=click_on_draft;
obj_2=document.getElementById("wordOfDraft");
obj_2.onclick=click_on_draft;


//草图---关闭选项框的函数
function close_draft_selection(e){
    if(!e) e=window.event;
    var btn=e.button;
    var whichone=(btn<2)?"left":"right";
    if(whichone==="left"){
        document.getElementById('draft_selection').style.visibility="hidden";
    }
}
obj_3=document.getElementById("close_draft");
obj_3.onclick=close_draft_selection;


obj_4=document.getElementById("return");
obj_5=document.getElementById("continue");
obj_4.onmouseover=change_color_of_Return;
obj_4.onmouseleave=back_color_of_Return;
obj_5.onmouseover=change_color_of_Continue;
obj_5.onmouseleave=back_color_of_Continue;

function change_color_of_Return(){
    document.getElementById("return").src="fonts/return_hover.svg";
}
function change_color_of_Continue(e) {
    document.getElementById("continue").src="fonts/continue_after.svg";
}
function back_color_of_Return() {
    document.getElementById("return").src="fonts/return.svg";
}
function back_color_of_Continue() {
    document.getElementById("continue").src="fonts/continue.svg";
}




